package com.ruoyi.ring.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ring.domain.RingInteractiveThumbs;
import com.ruoyi.ring.mapper.RingInteractiveThumbsMapper;
import com.ruoyi.ring.service.IRingInteractiveThumbsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 互动点赞Service业务层处理
 * 
 * @author liuwp
 * @date 2025-11-21
 */
@Service
public class RingInteractiveThumbsServiceImpl implements IRingInteractiveThumbsService 
{
    @Resource
    private RingInteractiveThumbsMapper ringInteractiveThumbsMapper;

    /**
     * 查询互动点赞
     * 
     * @param id 互动点赞主键
     * @return 互动点赞
     */
    @Override
    public RingInteractiveThumbs selectRingInteractiveThumbsById(Long id)
    {
        return ringInteractiveThumbsMapper.selectRingInteractiveThumbsById(id);
    }

    /**
     * 查询互动点赞列表
     * 
     * @param ringInteractiveThumbs 互动点赞
     * @return 互动点赞
     */
    @Override
    public List<RingInteractiveThumbs> selectRingInteractiveThumbsList(RingInteractiveThumbs ringInteractiveThumbs)
    {
        return ringInteractiveThumbsMapper.selectRingInteractiveThumbsList(ringInteractiveThumbs);
    }

    /**
     * 根据业务主键查询一条记录：互动点赞
     *
     * @param ringInteractiveThumbs 互动点赞
     * @return 互动点赞
     */
    @Override
    public RingInteractiveThumbs selectOneRingInteractiveThumbs(RingInteractiveThumbs ringInteractiveThumbs)
    {
        return ringInteractiveThumbsMapper.selectOneRingInteractiveThumbs(ringInteractiveThumbs);
    }

    /**
     * 新增互动点赞
     * 
     * @param ringInteractiveThumbs 互动点赞
     * @return 结果
     */
    @Override
    public int insertRingInteractiveThumbs(RingInteractiveThumbs ringInteractiveThumbs)
    {
        ringInteractiveThumbs.setCreateTime(DateUtils.getNowDate());
        return ringInteractiveThumbsMapper.insertRingInteractiveThumbs(ringInteractiveThumbs);
    }

    /**
     * 修改互动点赞
     * 
     * @param ringInteractiveThumbs 互动点赞
     * @return 结果
     */
    @Override
    public int updateRingInteractiveThumbs(RingInteractiveThumbs ringInteractiveThumbs)
    {
        return ringInteractiveThumbsMapper.updateRingInteractiveThumbs(ringInteractiveThumbs);
    }

    @Override
    public int updateRingInteractiveThumbsCondition(RingInteractiveThumbs ringInteractiveThumbs, RingInteractiveThumbs ringInteractiveThumbsCondition)
    {
        return ringInteractiveThumbsMapper.updateRingInteractiveThumbsCondition(ringInteractiveThumbs, ringInteractiveThumbsCondition);
    }

    /**
     * 批量删除互动点赞
     * 
     * @param ids 需要删除的互动点赞主键
     * @return 结果
     */
    @Override
    public int deleteRingInteractiveThumbsByIds(Long[] ids)
    {
        return ringInteractiveThumbsMapper.deleteRingInteractiveThumbsByIds(ids);
    }

    /**
     * 删除互动点赞信息
     * 
     * @param id 互动点赞主键
     * @return 结果
     */
    @Override
    public int deleteRingInteractiveThumbsById(Long id)
    {
        return ringInteractiveThumbsMapper.deleteRingInteractiveThumbsById(id);
    }

    /**
     * 条件删除互动点赞
     *
     * @param ringInteractiveThumbs 互动点赞
     * @return 结果
     */
    @Override
    public int deleteRingInteractiveThumbsByCondition(RingInteractiveThumbs ringInteractiveThumbs)
    {
        return ringInteractiveThumbsMapper.deleteRingInteractiveThumbsByCondition(ringInteractiveThumbs);
    }

}
